package com.portal4kids.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "services_language")
public class ServicesLanguage implements Serializable{
	private static final long serialVersionUID = -744866393680282182L;
	private int id_language;
	private String name = "none";
	private double time = 00.00;
	private String address = "none"; 
	private String methodLearning = "none";
	private String individual = "NIE";
	private String groups = "NIE";
	private String atHome = "NIE";
	private String atSchool = "NIE";
	private String descripton = "";
	private int rating = 0;
	private int avarage = 0;
	private int numberOfVotes = 0;
	
	@Id
    @GeneratedValue
	public int getId_language() {
		return id_language;
	}
	public void setId_language(int id_language) {
		this.id_language = id_language;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		if(!name.isEmpty())
			this.name = name;
	}
	public double getTime() {
		return time;
	}
	public void setTime(double time) {
		if(time > 0.5)
			this.time = time;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		if(!address.isEmpty())
			this.address = address;
	}
	public String getMethodLearning() {
		return methodLearning;
	}
	public void setMethodLearning(String methodLearning) {
		if(!methodLearning.isEmpty())
			this.methodLearning = methodLearning;
	}
	public String getIndividual() {
		return individual;
	}
	public void setIndividual(String individual) {
		if(!individual.isEmpty())
			this.individual = individual;
	}
	
	public String getGroups() {
		return groups;
	}
	public void setGroups(String groups) {
		if(!groups.isEmpty())
			this.groups = groups;
	}
	public String getAtHome() {
		return atHome;
	}
	public void setAtHome(String atHome) {
		if(!atHome.isEmpty())
			this.atHome = atHome;
	}
	public String getAtSchool() {
		return atSchool;
	}
	public void setAtSchool(String atSchool) {
		if(!atSchool.isEmpty())
			this.atSchool = atSchool;
	}
	@Column(name="description", length=10000)
	public String getDescripton() {
		return descripton;
	}
	public void setDescripton(String descripton) {
		if(!descripton.isEmpty())
			this.descripton = descripton;
	}
	
	public int getRating() {
		return rating;
	}
	public void setRating(int rating) {
		this.rating = rating;
	}
	public int getAvarage() {
		return avarage;
	}
	public void setAvarage(int avarage) {
		this.avarage = avarage;
	}
	public int getNumberOfVotes() {
		return numberOfVotes;
	}
	public void setNumberOfVotes(int numberOfVotes) {
		this.numberOfVotes = numberOfVotes;
	}
	@Override
	public String toString() {
		return "ServicesLanguage [id_language=" + id_language + ", name="
				+ name + ", time=" + time + ", address=" + address
				+ ", methodLearning=" + methodLearning + ", individual="
				+ individual + ", group=" + groups + ", atHome=" + atHome
				+ ", atSchool=" + atSchool + "]";
	}
	

}
